﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Project2
{
    internal class 操作符
    {
        private static void Main操作符(string[] args)
        {
            Person personF = new Person();
            personF.Name = "bab";
            Person personM = new Person();
            personM.Name = "Mama";
            List<Person> PeopleList = Person.Marry(personM, personF);
            foreach (Person person in PeopleList)
            {
                Console.WriteLine(person.Name);
            }

            List<Person> PeopleList2 = Person.Marry(personM, personF);
            foreach (Person person in PeopleList2)
            {
                Console.WriteLine(person.Name);
            }
        }
    }

    internal class Person
    {
        public int Id;
        public string Name;

        public static List<Person> Marry(Person fa, Person b)
        {
            List<Person> List = new List<Person>();

            List.Add(fa);
            List.Add(b);
            for (int i = 0; i < 10; i++)
            {
                Person chi = new Person();
                chi.Name = fa.Name + b.Name + "s Child";
                List.Add(chi);
            }

            return List;
        }

        public static List<Person> operator +(Person fa, Person b)
        {
            List<Person> List = new List<Person>();

            List.Add(fa);
            List.Add(b);
            for (int i = 0; i < 10; i++)
            {
                Person chi = new Person();
                List.Add(chi);
            }

            return List;
        }
    }
}